namespace JGSY.CMS.LowCode.Platform.Application.Interfaces
{
    /// <summary>
    /// 租户资源配额管理服务接口
    /// </summary>
    public interface ITenantResourceQuotaService
    {
        // 配额管理基本操作
        Task<object> GetQuotaAsync(Guid tenantId);
        Task<object> CreateQuotaAsync(Guid tenantId, object request);
        Task<object> UpdateQuotaAsync(Guid tenantId, object request);
        Task DeleteQuotaAsync(Guid tenantId);
        
        // 资源使用情况
        Task<object> GetUsageAsync(Guid tenantId);
        Task<List<object>> GetUsageHistoryAsync(Guid tenantId, DateTime? startTime = null, DateTime? endTime = null);
        
        // 配额检查
        Task<bool> CheckStorageQuotaAsync(Guid tenantId, long additionalSize = 0);
        Task<bool> CheckUserQuotaAsync(Guid tenantId, int additionalUsers = 0);
        Task<bool> CheckApiCallQuotaAsync(Guid tenantId, int additionalCalls = 0);
        Task<bool> CheckBandwidthQuotaAsync(Guid tenantId, long additionalBandwidth = 0);
        
        // 配额预警
        Task<List<object>> GetQuotaAlertsAsync(Guid tenantId);
        Task<object> CreateQuotaAlertAsync(Guid tenantId, object request);
        Task<object> UpdateQuotaAlertAsync(Guid alertId, object request);
        Task DeleteQuotaAlertAsync(Guid alertId);
        
        // 配额统计
        Task<object> GetQuotaStatisticsAsync(Guid tenantId);
        Task<List<object>> GetAllTenantsQuotaStatisticsAsync();
        
        // 配额重置
        Task ResetQuotaUsageAsync(Guid tenantId, string resourceType);
        Task ResetAllQuotaUsageAsync(Guid tenantId);
        
        // 批量操作
        Task<List<object>> GetQuotasByTenantIdsAsync(List<Guid> tenantIds);
        Task UpdateMultipleQuotasAsync(List<object> requests);
        
        // 导出功能
        Task<byte[]> ExportQuotaReportAsync(Guid tenantId, string format = "xlsx");
        Task<byte[]> ExportAllTenantsQuotaReportAsync(string format = "xlsx");
    }
}